Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to ignore one or all rules for a file by adding a comment #76

Closed
wants to merge 1 commit into from
Closed

Conversation

evermeer
Copy link

@evermeer evermeer commented Jun 3, 2015

With this change you can disable all rules for a file by adding the following line to your swift file:
// SwiftLint ignore all
or you can disable a specific rule by adding something like:
// SwiftLint ignore variable_name
Where variable_name is the identifier of the rule

With this change you can disable all rules for a file by adding the following line to your swift file:
// SwiftLint ignore all
or you can disable a specific rule by adding something like:
// SwiftLint ignore variable_name
Where variable_name is the identifier of the rule
@segiddins
Copy link
Contributor

This only seems to be per-file, and thus has no way to only ignore a certain section of code?

@jpsim
Copy link
Collaborator

jpsim commented Jun 3, 2015

This would conflict with the current proposal described in #4. Although the approach of filtering the results could still work with file regions rather than per-file.

@evermeer
Copy link
Author

evermeer commented Jun 4, 2015

When #4 will be implemented soon, then this PR can be closed without merge.

@keith
Copy link
Collaborator

keith commented Sep 2, 2015

A similar but different version of this was implemented in #111

@jpsim
Copy link
Collaborator

jpsim commented Sep 2, 2015

Thanks for pointing that out, @keith. Closing since #111 allows this behavior and more.

@jpsim jpsim closed this Sep 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants